package com.example.goodpet.db.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.goodpet.db.entity.SearchHistory;

import java.util.List;

@Dao
public interface SearchHistoryDAO {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(SearchHistory searchHistory);

    @Query("delete from search_history")
    void delete();

    @Query("select * from search_history Order By createTime DESC")
    List<SearchHistory> selectListHistory();


}
